package cm.zhentao.entity;

import java.util.HashMap;
import java.util.Map;

public class Constant {
    public static String TOKEN_NAME = "token";
    public static final String LOGIN_USER_KEY = "login_key:";
    public static final Integer EXPIRE_TIME = 7 * 24 * 60 * 60;
    //未选择记住我 默认过期时间
    public static final Integer DEFAULT_EXPIRE_TIME = 30 * 60;
    /**
     * 请求响应码常量
     */
    public static final Integer RESPONSE_CODE_SUCCESS = 200;
    public static final Integer RESPONSE_CODE_ERROR = 400;
    public static final Integer RESPONSE_CODE_NO_LOGIN = 402;
    public static final Integer RESPONSE_CODE_FORBIDDEN = 403;
    public static final Map<Integer, String> RESPONSE_CODE_MAP = new HashMap<>();

    static {
        RESPONSE_CODE_MAP.put(RESPONSE_CODE_SUCCESS, "请求成功");
        RESPONSE_CODE_MAP.put(RESPONSE_CODE_ERROR, "请求失败");
        RESPONSE_CODE_MAP.put(RESPONSE_CODE_NO_LOGIN, "未登录");
        RESPONSE_CODE_MAP.put(RESPONSE_CODE_FORBIDDEN, "权限不足");
    }
}